import { RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "home",
    component: () => import("@/views/home/index.vue"),
    meta: { title: "主页", keepAlive: true },
  },
  {
    path: "/mine",
    name: "mine",
    component: () => import("@/views/mine/index.vue"),
    meta: { title: "我的" },
  },
  {
    path: "/account",
    name: "account",
    component: () => import("@/views/account/index.vue"),
    meta: { title: "结算" },
  },
  {
    path: "/user",
    name: "user",
    component: () => import("@/views/card/index.vue"),
    meta: { title: "个人信息" },
  },
  {
    path: "/form",
    name: "form",
    component: () => import("@/views/info/form.vue"),
    meta: { title: "填写表单" },
  },
  {
    path: "/info/:from?",
    name: "info",
    component: () => import("@/views/info/index.vue"),
    meta: { title: "个人卡片" },
  },
  {
    path: "/:pathMatch(.*)*",
    name: "NotFound",
    component: () => import("@/views/404.vue"),
  },
];

export default routes;
